using UniversalAdmin.Domain.Entities;
using UniversalAdmin.Domain.Enums;

namespace UniversalAdmin.Domain.Repositories;

public interface IArticleRepository : IRepository<Article>
{
  Task<(IEnumerable<Article> Items, int TotalCount)> GetPagedArticlesAsync(
      string? keyword = null,
      int? categoryId = null,
      ArticleStatus? status = null,
      int pageIndex = 1,
      int pageSize = 10);

  Task<(IEnumerable<Article> Items, int TotalCount)> SearchArticlesAsync(
        string? keyword = null,
        ArticleStatus? status = null,
        DateTime? start = null,
        DateTime? end = null,
        int pageIndex = 1,
        int pageSize = 10,
        CancellationToken ct = default);
}